<div class="wrapper">
    <div cg-busy="{promise:loading,message:'正在加载...'}">
        <div class="panel panel-default no-border">
            <div class="panel-heading visible-xs">
                <h4 class="text-center">填写报考信息</h4>
            </div>
            <div class="panel-body">
                <div class="hbox bg-white bg">
                    <div class="col wrapper-xs">
                        <span>报名号</span>
                        <div class="h4 text-info font-thin">{{student.examId}}</div>
                    </div>
                    <div class="col wrappe-xs bg-white">
                        <span>考试类型</span>
                        <div class="h4 text-info font-thin">{{student.examType.name}}</div>
                    </div>
                    <div class="col wrapper-xs bg-white">
                        <span>考试科类</span>
                        <div class="h4 text-info font-thin">{{student.subject.name}}</div>
                    </div>
                </div>
                <div class="hbox bg-white bg">
                    
                    <div class="col wrapper-xs bg-white">
                        <span>报名点</span>
                        <div class="h4 text-info font-thin">{{student.signPoint.name}}</div>
                    </div>
                    <div class="col wrapper-xs bg-white">
                        <span>毕业学校</span>
                        <div class="h4 text-info font-thin">{{student.gradeSchool.name}}</div>
                    </div>
                    <div class="col wrapper-xs bg-white">
                    <span>考生类别</span>
                        <div class="h4 text-info font-thin">{{student.stuType.name || (student.periodId == 1?'应届':'往届')}}</div>
                    </div>
                </div>
            </div>
        </div>
        <form ng-class="{'form-horizontal':true,'submitted':submitted}" name="form" ng-submit="submit(form)" novalidate>
            <p ng-if="student.subjectType" class="padder font-bold"><i class="glyphicon glyphicon-th-list"></i>&nbsp;报考信息</p>
            <div ng-if="student.subjectType" class="panel panel-default no-border">
                <div class="panel-body">
                    <div ng-if="student.subjectType == 'ART'" class="form-group pull-in clearfix">
                        <div  class="col-sm-12">
                            <label class="col-sm-3 control-label">艺术类统考</label>
                            <div class="col-sm-9">
                                <div class="text-danger" ng-show="form.specialty.$invalid">请选择专业或选择不报考</div>
                                <div ng-repeat="item in student.arts">
                                    <label class="checkbox">
                                        <input type="checkbox" ng-disabled="(student.pay && student.pay.paid) || (item.id != 9 && !specSigned)" name="specialty" ng-required="(student.arts | filter:{isEnabled:true}).length == 0" ng-change="specChange(item)" ng-model="item.isEnabled"> {{item.name}}
                                        <span class="text-danger" ng-show="item.isEnabled && item.directs.length > 0 && (item.directs | filter:{isEnabled:true}).length == 0">：（至少选择一个方向）</span>
                                    </label>
                                    <label ng-repeat="d in item.directs" ng-show="item.isEnabled" class="checkbox-inline">
                                        <input type="checkbox" name="direct" ng-disabled="student.pay && student.pay.paid" ng-model="d.isEnabled" ng-required="item.isEnabled && (item.directs | filter:{isEnabled:true}).length == 0"> {{d.name}}方向
                                    </label>
                                    
                                </div>
                            </div>
                        </div>
                        
                    </div>
                <div ng-if="student.subjectType == 'SPORT'" class="form-group pull-in clearfix">
                    <div class="col-sm-2">
                        <label>体育专业素质测试</label>
                        <select ng-change="sportChange(student.sportSigned)" ng-disabled="student.pay && student.pay.paid" class="form-control" ng-model="student.sportSigned" >
                            <option value="1">报考</option>
                            <option value="2">不报考</option>
                        </select>
                    </div>
                    <div ng-show="student.sportSigned == 1" class="col-sm-10">
                        <label>体育测试项目</label>
                        <select class="form-control" ng-model="student.sport" ng-disabled="student.pay && student.pay.paid" ng-options="item.name for item in sports track by item.id" ng-required="student.sportSigned == 1">
                            <option value="">选择测试项目</option>
                        </select>
                    </div>
                </div>
                </div>
            </div>
            <p class="padder font-bold"><i class="glyphicon glyphicon-th-list"></i>&nbsp;基本资料</p>
            <div class="panel panel-default no-border">
                <div class="panel-body">
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">姓名</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" ng-maxlength="16" ng-trim="true" maxlength="16" ng-model="student.name" name="stuName" ng-change="student.receive = student.name" autocomplete="off" placeholder="最多16个汉字" required />
                            </div>
                        </div>
                        <div ng-class="{'col-sm-4':true,'has-error':form.certino.$dirty && form.certino.$invalid}">
                            <label class="col-sm-4 control-label">身份证号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" ng-model="student.certino" name="certino" ng-maxlength="18" required autocomplete="off" ng-pattern="/^((11|12|13|14|15|21|22|23|31|32|33|34|35|36|37|41|42|43|44|45|46|50|51|52|53|54|61|62|63|64|65|71|81|82|91)\d{4})((((19|20)(([02468][048])|([13579][26]))0229))|((20[0-9][0-9])|(19[0-9][0-9]))((((0[1-9])|(1[0-2]))((0[1-9])|(1\d)|(2[0-8])))|((((0[1,3-9])|(1[0-2]))(29|30))|(((0[13578])|(1[02]))31))))((\d{3}(X))|(\d{4}))$/" />
                                <span class="help-block" ng-show="form.certino.$dirty && form.certino.$invalid">请输入正确的身份证号</span>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">性别</label>
                            <div class="col-sm-8">
                                <label class="radio-inline">
                                    <input type="radio" name="gender" value="1" ng-model="student.gender"> 男
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="gender" value="2" ng-model="student.gender"> 女
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">民族</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="nation" ng-model="student.nation" ng-options="item.name for item in nations track by item.id" required>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">学籍号</label>
                            <div class="col-sm-8">
                                <input type="text" name="stuID" ng-maxlength="20" maxlength="20" ng-model="student.stuID" class="form-control" placeholder="最多20位" required autocomplete="off" />
                                <span class="help-block text-danger" ng-show="form.stuID.$dirty && form.stuID.$invalid">学籍号为11位数字</span>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">政治面貌</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="polity" ng-model="student.polity" ng-options="item.name for item in polities track by item.id" required>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-8">
                            <label class="col-xs-12 col-sm-2 control-label">户口所在地</label>
                            <div class="col-xs-4 col-sm-3">
                                <select class="form-control" name="prov" ng-model="student.censusProv" ng-options="item.name for item in provs track by item.id" ng-change="loadCity(student.censusProv)" required>
                                    <option value="">省份</option>
                                </select>
                            </div>
                            <div class="col-xs-4 col-sm-3" ng-show="student.censusProv && student.censusProv.id == 42">
                                <select class="form-control" name="city" ng-model="student.censusCity" required ng-options="item.name for item in cities track by item.id" ng-change="loadRegion(student.censusCity)" ng-required="student.censusProv && student.censusProv.id == 42">
                                    <option value="">市州</option>
                                </select>
                            </div>
                            <div class="col-xs-4 col-sm-4" ng-show="student.censusProv && student.censusProv.id == 42">
                                <select class="form-control" name="region" ng-model="student.censusRegion" ng-options="item.name for item in regions track by item.id" ng-required="student.censusProv && student.censusProv.id == 42">
                                    <option value="">区县</option>
                                </select>
                            </div>
                        </div>
                        
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-8">
                            <label class="col-xs-12 col-sm-2 control-label">毕业学校</label>
                            <div class="col-xs-3 col-sm-2">
                                <select class="form-control" ng-model="student.gradeSchoolCity" ng-options="item.name for item in schoolCities track by item.id" ng-change="loadSchoolRegion(student.gradeSchoolCity)">
                                    <option value="">市州</option>
                                </select>
                            </div>
                            <div class="col-xs-3 col-sm-2">
                                <select class="form-control" ng-model="student.gradeSchoolRegion" ng-options="item.name for item in schoolRegions track by item.id" ng-change="loadSchool(student.gradeSchoolRegion)">
                                    <option value="">区县</option>
                                </select>
                            </div>
                            <div class="col-xs-6 col-sm-6">
                                <select class="form-control" name="gradeSchool" ng-model="student.gradeSchool" ng-options="item.name for item in schools track by item.id" required>
                                    <option value="">学校</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">班级</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="schoolClass" ng-model="student.schoolClass" ng-options="item.name for item in classes track by item.id" required>
                                    <option>班级</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">英语口语</label>
                            <div class="col-sm-8">
                                <select class="form-control" ng-disabled="student.examType.id != 1" ng-model="student.spokenType" ng-options="item.name for item in spokenTypes track by item.id" required>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">考生类别</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="stuType" ng-model="student.stuType" ng-options="item.name for item in stuTypes | filter:{periodId:student.periodId} track by item.id " required>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4" ng-show="student.examType.id != 3">
                            <label class="col-sm-4 control-label">考试语种</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="foreign" ng-model="student.foreign" ng-options="item.name for item in foreigns track by item.id" required>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">收件人</label>
                            <div class="col-sm-8">
                                <input type="text" name="receive" ng-maxlength="16" maxlength="16" autocomplete="off" ng-model="student.receive" class="form-control" placeholder="最多16个汉字" required />
                            </div>
                        </div>
                        <div class="col-sm-8">
                            <label class="col-sm-2 control-label">收件地址</label>
                            <div class="col-sm-10">
                                <input type="text" name="address" ng-maxlength="30" maxlength="30" autocomplete="off" ng-model="student.address" class="form-control" placeholder="最多30个汉字" title="应冠以省、县（市、区）名称，并注明街道或住宅小区名称和门牌号码，最多不超过30个汉字。" required />
                            </div>
                        </div>
                        
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">收件邮编</label>
                            <div class="col-sm-8">
                                <input type="text" name="zipcode" maxlength="6" ng-pattern="/^[1-9][0-9]{5}$/" ng-model="student.zipcode" class="form-control" required autocomplete="off" />
                                <span class="help-block text-danger" ng-show="form.zipcode.$dirty && form.zipcode.$invalid">请输入正确的邮编</span>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">毕业类别</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="graduation" ng-model="student.graduation" ng-options="item.name for item in graduations track by item.id" required>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <label class="col-sm-4 control-label">现阶段班主任或负责人</label>
                            <div class="col-sm-8">
                                <input type="text" name="teacher" placeholder="最多8个汉字" ng-maxlength="8" maxlength="8" autocomplete="off" ng-model="student.teacher" class="form-control" required />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                    <div class="col-sm-12">
                            <label class="col-sm-3 control-label">有何特长</label>
                            <div class="col-sm-9">
                                <input type="text" name="special" placeholder="最多20个汉字" ng-maxlength="20" maxlength="20" autocomplete="off" ng-model="student.special" class="form-control" required />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <label class="col-sm-3 control-label">高中阶段以来受过何种奖励或处分</label>
                            <div class="col-sm-9">
                                <textarea ng-model="student.honor" placeholder="最多30个汉字" ng-maxlength="30" maxlength="30" class="form-control" rows="5" title="录入高中阶段以来受到过的校级以上奖励的情况，处分只录入有文字记载的处分情况，若无受奖励或处分情况就填写无。" required></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <p class="padder font-bold"><i class="glyphicon glyphicon-th-list"></i>&nbsp;个人简历（从高中起）
            </p>
            <div class="panel panel-default no-border">

                <div class="panel-body">
                <p>
                <span class="help-block text-danger" ng-show="form.endYear.$invalid">结束年份不能小于开始年份</span>
                </p>
                    <div  class="form-group pull-in clearfix">
                        <div class="col-xs-6 col-sm-2">
                            <label>自（{{student.edu[0].start}}年9月）</label>
                            <input type="text" ng-model="student.edu[0].start" maxlength="4" class="form-control" placeholder="开始年份" ng-pattern="/^(1|2)\d{3}$/" required autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>至（{{student.edu[0].end}}年6月)</label>
                            <input type="text" ng-model="student.edu[0].end" maxlength="4"  name="endYear" class="form-control" placeholder="结束年份" integer year="student.edu[0].start" autocomplete="off" required />
                        </div>
                        <div class="col-xs-12 col-sm-4">
                            <label>学校</label>
                            <input type="text" ng-model="student.edu[0].school" ng-maxlength="20" maxlength="20" class="form-control" required placeholder="最多20个汉字" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>职务</label>
                            <input type="text" autocomplete="off" ng-model="student.edu[0].post" class="form-control" ng-maxlength="5" maxlength="5" placeholder="最多5个汉字" required />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>证明人</label>
                            <input type="text" ng-maxlength="8" maxlength="8" ng-model="student.edu[0].witness" class="form-control" autocomplete="off" placeholder="最多8个汉字" required/>
                        </div>
                    </div>
<p>
                <span class="help-block text-danger" ng-show="form.endYear2.$invalid">结束年份不能小于开始年份</span>
                </p>
                    <div  class="form-group pull-in clearfix">
                        <div class="col-xs-6 col-sm-2">
                            <label>自（{{student.edu[1].start}}年9月）</label>
                            <input type="text" ng-model="student.edu[1].start" maxlength="4" class="form-control" placeholder="开始年份" ng-pattern="/^(1|2)\d{3}$/" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>至（{{student.edu[1].end}}年6月)</label>
                            <input type="text" ng-model="student.edu[1].end" maxlength="4" name="endYear2" class="form-control" placeholder="结束年份" ng-required="student.edu[1].start" integer year="student.edu[1].start" autocomplete="off" />
                        </div>
                        <div class="col-xs-12 col-sm-4">
                            <label>学校</label>
                            <input type="text" ng-model="student.edu[1].school" ng-maxlength="20" maxlength="20" class="form-control" ng-required="student.edu[1].start" placeholder="最多20个汉字" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>职务</label>
                            <input type="text" autocomplete="off" ng-maxlength="5" maxlength="5" ng-model="student.edu[1].post" class="form-control" placeholder="最多5个汉字" ng-required="student.edu[1].start" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>证明人</label>
                            <input type="text" ng-model="student.edu[1].witness" ng-maxlength="8" maxlength="8" class="form-control" autocomplete="off" placeholder="最多8个汉字" ng-required="student.edu[1].start" />
                        </div>
                    </div>
                    <p>
                <span class="help-block text-danger" ng-show="form.endYear3.$invalid">结束年份不能小于开始年份</span>
                </p>
                    <div  class="form-group pull-in clearfix">
                        <div class="col-xs-6 col-sm-2">
                            <label>自（{{student.edu[2].start}}年9月）</label>
                            <input type="text" ng-model="student.edu[2].start" maxlength="4" class="form-control" placeholder="开始年份" ng-pattern="/^(1|2)\d{3}$/" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>至（{{student.edu[2].end}}年6月)</label>
                            <input type="text" ng-model="student.edu[2].end" maxlength="4"  name="endYear3" class="form-control" placeholder="结束年份" ng-required="student.edu[2].start" integer year="student.edu[2].start" autocomplete="off" />
                        </div>
                        <div class="col-xs-12 col-sm-4">
                            <label>学校</label>
                            <input type="text" ng-model="student.edu[2].school" ng-maxlength="20" maxlength="20" class="form-control" ng-required="student.edu[2].start" placeholder="最多20个汉字" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>职务</label>
                            <input type="text" autocomplete="off" ng-maxlength="5" maxlength="5" ng-model="student.edu[2].post" class="form-control" placeholder="最多5个汉字" ng-required="student.edu[2].start" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>证明人</label>
                            <input type="text" ng-model="student.edu[2].witness" ng-maxlength="8" maxlength="8" class="form-control" autocomplete="off" placeholder="最多8个汉字" ng-required="student.edu[2].start" />
                        </div>
                    </div>
                </div>
            </div>
            <p class="padder font-bold"><i class="glyphicon glyphicon-th-list"></i>&nbsp;家庭成员
            </p>
            <div class="panel panel-default no-border">
                <div class="panel-body">
                    <div class="form-group pull-in clearfix" ng-repeat="f in student.family">
                        <div class="col-xs-4 col-sm-2">
                            <label>关系</label>
                            <select class="form-control" ng-model="f.relation" ng-required="$index == 0">
                            <option value="">--选择关系--</option>
                                <option value="父子">父子</option>
                                <option value="父女">父女</option>
                                <option value="母子">母子</option>
                                <option value="母女">母女</option>
                                <option value="其它">其它</option>
                            </select>
                        </div>
                        <div class="col-xs-4 col-sm-2">
                            <label>姓名</label>
                            <input type="text" ng-maxlength="8" maxlength="8" class="form-control" ng-model="f.name" ng-required="$index == 0 || f.relation" placeholder="最多8个汉字" autocomplete="off" />
                        </div>
                        <div class="col-xs-4 col-sm-2">
                            <label>政治面貌</label>
                            <select class="form-control" ng-model="f.polity" ng-required="$index == 0 || f.relation">
                                <option value="群众">群众</option>
                                <option value="中共党员">中共党员</option>
                                <option value="中共预备党员">中共预备党员</option>
                                <option value="民革党员">民革党员</option>
                                <option value="民盟盟员">民盟盟员</option>
                                <option value="民建会员">民建会员</option>
                                <option value="民进会员">民进会员</option>
                                <option value="农工党党员">农工党党员</option>
                                <option value="致公党党员">致公党党员</option>
                                <option value="九三学社社员">九三学社社员</option>
                                <option value="台盟盟员">台盟盟员</option>
                                <option value="无党派人士">无党派人士</option>
                            </select>
                        </div>
                        <div class="col-xs-12 col-sm-2">
                            <label>工作单位</label>
                            <input type="text" ng-maxlength="12" maxlength="12" ng-model="f.company" class="form-control" ng-required="$index == 0 || f.relation" placeholder="最多12个汉字" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>职务</label>
                            <input type="text" ng-maxlength="5" maxlength="5" ng-model="f.post" class="form-control" ng-required="$index == 0 || f.relation" placeholder="最多5个汉字" autocomplete="off" />
                        </div>
                        <div class="col-xs-6 col-sm-2">
                            <label>学历</label>
                            <select class="form-control" ng-model="f.edu" ng-required="$index == 0 || f.relation">
                                <option value="小学毕业及以下">小学毕业及以下</option>
                                <option value="初中毕业">初中毕业</option>
                                <option value="高中毕业">高中毕业</option>
                                <option value="专科毕业">专科毕业</option>
                                <option value="本科毕业">本科毕业</option>
                                <option value="硕士研究生及以上">硕士研究生及以上</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group pull-in clearfix text-center">
                    <button ng-if="opt == 'edit'" ui-sref="home.exam" type="button" class="btn btn-lg btn-default">返回</button>&nbsp;&nbsp;
                    <button type="submit" ng-disabled="state" class="btn btn-lg btn-info">提交<span ng-if="state">处理中...</span></button>
            </div>
        </form>
    </div>
</div>
